﻿CREATE TABLE [dbo].[Resource] (
    [ResourceId]      INT           IDENTITY (1, 1) NOT NULL,
    [ApplicationId]   INT           CONSTRAINT [DF_Resource_EnterpriseId] DEFAULT ((1)) NOT NULL,
    [Name]            VARCHAR (50)  NOT NULL,
    [Uri]             VARCHAR (150) NOT NULL,
    [adt_DateCreated] DATETIME      CONSTRAINT [DF_Resource_adt_DateCreated] DEFAULT (getdate()) NOT NULL,
    [adt_CreatedBy]   VARCHAR (50)  NULL,
    CONSTRAINT [PK_Resource_1] PRIMARY KEY CLUSTERED ([ResourceId] ASC)
);


GO
CREATE UNIQUE NONCLUSTERED INDEX [IX_Resource]
    ON [dbo].[Resource]([Name] ASC, [ApplicationId] ASC);

